<?php 
class Acl extends Zend_Acl {
  public function __construct() {

  	$this->addRole(new Zend_Acl_Role('guest'));
    $this->addRole(new Zend_Acl_Role('user'), 'guest');
 
    $this->add(new Zend_Acl_Resource('admin'));
    $this->add(new Zend_Acl_Resource('auth'));
    $this->add(new Zend_Acl_Resource('error'));
    $this->add(new Zend_Acl_Resource('index'));
    $this->add(new Zend_Acl_Resource('news'));
    
    $this->add(new Zend_Acl_Resource('articles'));
    $this->add(new Zend_Acl_Resource('order'));
    $this->add(new Zend_Acl_Resource('price'));
    $this->add(new Zend_Acl_Resource('gallery'));
    $this->add(new Zend_Acl_Resource('structure'));
    $this->add(new Zend_Acl_Resource('guest-book'));
    $this->add(new Zend_Acl_Resource('seo'));
    $this->add(new Zend_Acl_Resource('osvita'));
 
    
    $this->allow('user');
    $this->allow('user','admin');
    $this->allow('user','auth');
    $this->allow('user','error');
    $this->allow('user','index');
    
    
    $this->allow('guest', 'auth');
    $this->allow('guest', 'osvita');
    
    $this->allow('guest', 'seo', 'sitemap');
    
    $this->allow('guest', 'news','index');
    $this->allow('guest', 'news','view');
    
    $this->allow('guest', 'articles', 'view');
    
    $this->allow('guest', 'guest-book', 'index');
    
    
    $this->allow('guest', 'gallery', 'pictureupload');
    $this->allow('guest', 'gallery', 'view');
    
    
    $this->allow('guest', 'order', 'index');
    
    
    $this->allow('guest', 'price', 'index');
    
    
    
    $this->allow('guest', 'auth');
    $this->allow('guest', 'error');
    $this->allow('guest', 'index');
  }
}